<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>
    //从1到100 1 2 3 4 5 6 7 8 9 10...99 100
    let sum = 0
    for(i = 0;i < 101;i++){ //i代表每一个数字
        sum +=i
    }
    console.log(sum)

    let arr = [1,1,23,34,57,13,32,24,56,12,3,45,64,-6,-8,3,5,543,-9]
    let j = 0
    while(arr[j] >= 0){//当数组中下标所代表的数其数值大于0时
        console.log(arr[j])
    }//只有判断条件为真，才进行循环遍历，否则就无法进行循环，这时只需将为假的内容打印输出即可
    i++//数组下标增加
</script>
</body>
</html>